package com.firemoss.atonement.mapper.error
{
	import com.firemoss.atonement.metadata.Property;
	
	import org.as3commons.reflect.Type;
	
	public class UnresolvedTypeMapping
	{
		public var source : Class
		public var target : Class
		public var targetProperty : Property
		public var sourceProperty : Property
		
		public function toString():String
		{
			return "-- TYPE MISTMATCH: For the target type " 
			+ Type.forClass( target ).fullName + "'s \"" + targetProperty.name 
				+ "\" property of type \"" + targetProperty.type.fullName + ",\"\n\t" +
				"the property of the same name on the source class, \"" 
				+ Type.forClass( source ).fullName + ",\"\n\t" 
				+ "has a different type (" + sourceProperty.type.fullName + ").\n\t"
				+ "Please add a mapping between the types, change the types to match, or use [Ignored] annotation or \n\t"
				+ "mapping.ignoreProperty() to configure its resolution.";
		}
	}
}